export default class Food{
    element:HTMLElement
    constructor(){
        this.element=document.getElementById('food')
    }
    get X(){
        return this.element.offsetLeft
    }
    get Y(){
        return this.element.offsetTop
    }
    changeP(){
        let x=Math.floor(Math.random()*30)
        let y=Math.floor(Math.random()*30)
        this.element.style.left=x*10+'px'
        this.element.style.top=y*10+'px'
    }
}